import Attachment from './Attachment';

// 文章
export default class Article{
  attachment:Attachment;
  title:string;
  content:string;
  constructor(attachment:Attachment){
    this.attachment = attachment;
  }
  setTitle(title:string){
    this.title = title;
  }
  setContent(content:string){
    this.content = content;
  }
  getAttachment(){
    return this.attachment;
  }
  clone():Article{
    let article = new Article(this.attachment.clone());
    article.setTitle(this.title);
    article.setContent(this.content);
    return article;
  }
}
